package com.winforsys.android.test;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ComposePathEffect;
import android.graphics.CornerPathEffect;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PathDashPathEffect;
import android.view.View;



public class GradientLabel extends View {

	private int member = 10;
	
	public GradientLabel(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
	}
	
	@Override
	public void onDraw(Canvas canvas)
	{
		Paint paint = new Paint();
		
		paint.setAntiAlias(true);
		
		paint.setColor(Color.WHITE);
		
		Path dash = new Path();
		
		dash.moveTo(0, -4);
		
		dash.lineTo(4, -4);
		dash.lineTo(4, -8);
		dash.lineTo(10,0);
		dash.lineTo(4, 8);
		dash.lineTo(4, 4);
		dash.lineTo(0, 4);
		
		PathDashPathEffect fx = new PathDashPathEffect(dash, 14, 14, PathDashPathEffect.Style.ROTATE);
		
		paint.setPathEffect(fx);
		
		canvas.drawLine(100, 100, 200, 200, paint);
		canvas.drawCircle(200, 200, 100, paint);
		
		ComposePathEffect fx2 = new ComposePathEffect(fx, new CornerPathEffect(16));
		
		canvas.drawRect(50, 200, 250, 300, paint);
	}
}
